package main

import (
	"fmt"
	"time"
)

var ch = make(chan int)

func write()  {
	ch <- 1
}

func main() {
	go write()
	for {
		select {
		case <- ch:
			fmt.Println("ch")
		case <-time.After(time.Second * 2):
			aa := <-time.After(time.Second * 2)
			fmt.Println(aa)
			fmt.Println("timeOut")
		}
	}
}